local skel = fk.CreateSkill {
  name = "charm_trigger",
}

--- 法术伤害无视护甲
skel:addEffect(fk.BeforeHpChanged, {
  global = true,
  can_refresh = function(self, event, target, player, data)
    return player == target and data.shield_lost
    and data.damageEvent and data.damageEvent.damageType == fk.CharmDamage
  end,
  on_refresh = function (self, event, target, player, data)
    data.num = data.num - data.shield_lost
    data.shield_lost = 0
    player.room:broadcastPlaySound("./packages/moepack/audio/card/charm_damage")
    player.room:delay(200)
  end,
})


Fk:loadTranslationTable{
  ["charm_trigger"] = "法术伤害",
}

return skel
